<h2 class="pageTitle">Receipt / delivery report</h2>

<div class="menu-list">
    <form action="{$data.root}?input=receipt_delivery&taskId={$smarty.request.taskId}" method="post">
        User: &nbsp;
        <select id="selectedUser" size="1" name="selectedUser">
            <option value="">Please select</option>
            {foreach from=$data.users item="user"}
                <option {if $data.prefill.user==$user.users_id}selected="selected"{/if} value="{$user.users_id}">{$user.name} {$user.surname}</option>
            {/foreach}
        </select>&nbsp;
        <input type="hidden" name="action" value="show" />
        <input type="submit" value="show" />
    </form>
</div>
{if  $smarty.request.action=='show'} 
    <div style="margin: 1em;">
        <a target="_blank" href="{$data.root}print.php?input=receipt_delivery&amp;selectedUser={$data.user_info.users_id}&amp;taskId={$smarty.request.taskId}&amp;action=show" class="basicButton">Print this protocol</a>
    </div>
    <table class="protocol-list">
        <tr>
            <td colspan="8">
                <table style="width: auto">
                    <tr>
                        <td rowspan="3">
                            <img src="{$data.root}images/alfac_no_text.png" width="120" />
                        </td>
                        <td colspan="2" style="padding-left: 10px;">
                            <h1 style="font-size: 18px; margin: 0px 0 5px 0; padding: 0">Alfa Centauri spol. s r.o.</h1>
                            Pri strelnici 3, 821 04 Bratislava<br/>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10px;">Web: www.alfac.sk </td>
                        <td>E-mail:  office@alfac.sk </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10px;">Kontaktná osoba:  {$data.contact_info.name} {$data.contact_info.surname}</td>
                        <td>E-mail: {$data.contact_info.email}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th colspan="8">
                <br/>
                <br/>
            </th>
        </tr>
        <tr>
            <th colspan="8" class="left-align">
        <h1 style="font-size: 18px; margin: 0px; padding: 0">PROTOKOL o odovzdaní / prevzatí zariadenia</h1>
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <th colspan="8" class="left-align" style="font-size: 14px">
        Pre {$data.client_info.fullName}, IČO: {$data.client_info.ICO}<br/>
        Dátum prevzatia / odovzdania: {$data.prefill.date}
        <br/><br/>
        Predpokladaný dátum vrátenia: {$data.prefill.return_date}
        <br/><br/>
        <span style="text-decoration: underline">Úloha: {$data.task.title}</span>
        <br/><br/>
        Priebeh prípadu s popisom preberaného / odovzdaného zariadenia:
        <br/><br/>
    </th>
</tr>
{foreach from=$data.descriptions key="name" item="desc"}
    <tr>
        <td style="border-bottom: 1px solid #dfdfdf" colspan="8">{$desc.text}</td>
    </tr>
{/foreach}
<tr>
    <th colspan="8" class="left-align">
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <td colspan="4">
        <b>Za Alfa Centauri spol. s.r.o.:</b><br/>
        Meno a priezvisko: {$smarty.session.user.profile.name} {$smarty.session.user.profile.surname} 
    </td>
    <td colspan="4"><br/>Podpis: ................................................</td>
</tr>
<tr>
    <th colspan="8" class="left-align">
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <td colspan="4">
        <b>Za {$data.client_info.fullName}:</b><br/>
        Meno a priezvisko: {$data.user_info.name} {$data.user_info.surname} 
    </td>
    <td colspan="4"><br/>Podpis: ................................................</td>
</tr>
</table>
{/if} 
